#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QtEvents>
#include <QAction>
#include <QSystemTrayIcon>
#include <QtSerialPort/QSerialPort>
#include <QtSerialPort/QSerialPortInfo>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    QSerialPort serial;

protected:
    void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;

private slots:
    void on_pushButton_clicked();
    void on_checkBox_clicked();
    void on_commandLinkButton_clicked();
    void on_pushButton_pressed();
    void on_comboBox_activated(const QString &arg1);
    void on_pushButton_released();
    void on_pushButton_5_released();
    void on_pushButton_7_released();
    void on_actionConnect_3_triggered();
    void on_actionQuit_triggered();
    void on_actionReflash_triggered();
    void setIcon(int index);
    void iconActivated(QSystemTrayIcon::ActivationReason reason);
    void showMessage();
    void messageClicked();
    void on_actionSettings_triggered();

private:
    void createActions();
    void createTrayIcon();

    Ui::MainWindow *ui;
    QAction *minimizeAction;
    QAction *maximizeAction;
    QAction *restoreAction;
    QAction *quitAction;
    QSystemTrayIcon *trayIcon;
    QMenu *trayIconMenu;
};


#endif

